/* 基础样式重置与全局设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* 主容器样式 */
.form-box {  /* 修正类名 */
    max-width: 800px;
    margin: 30px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* 表单标题样式 - 如果表单有标题的话 */
.form-box h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-weight: 600;
}

/* 表单列表样式 */
form ul {
    list-style: none;
}

form li {
    margin-bottom: 20px;
}

/* 表单标签样式 */
form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #444;
}

/* 输入框、文本域等表单元素样式 */
form input[type="text"],
form input[type="file"],
form textarea,
form select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

form textarea {
    min-height: 200px;
    resize: vertical;
}

/* 表单元素聚焦状态 */
form input[type="text"]:focus,
form textarea:focus,
form select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* 单选按钮样式 */
form input[type="radio"] {
    margin-right: 10px;
}

form input[type="radio"] + label {
    display: inline-block;
    margin-right: 20px;
    margin-bottom: 0;
    cursor: pointer;
}

/* 提交按钮样式 */
.submit-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    width: 100%;
    margin-top: 10px;
}

.submit-btn:hover {
    background-color: #2980b9;
}

.submit-btn:active {
    transform: translateY(1px);
}

/* 错误信息样式 - Django表单验证可能会生成错误信息 */
.errorlist {
    color: #e74c3c;
    margin-bottom: 10px;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .from-box {
        margin: 15px;
        padding: 20px;
    }

    form input[type="text"],
    form textarea,
    form select,
    .submit-btn {
        font-size: 14px;
        padding: 10px 12px;
    }

    form li {
        margin-bottom: 15px;
    }
}
